<!DOCTYPE html>
<html>
<head>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/jsp/common/mytags.jsp"%>
<title>申请合同</title>
<t:base type="jquery,my97,easyui,dataTables,lhgdialog"></t:base>
<%@ include file="/jsp/common/common_script.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<!-- extend -->
<script type="text/javascript" src="static_resources/javascript/model/sys_set/loan/loan_contract_add_or_edit.js"></script>
</head>



<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
	    <li><a href="javascript:void(0)">首页</a></li>
	    <li><a href="javascript:void(0)">贷款管理</a></li>
	    <li><a href="javascript:void(0)">贷款发放</a></li>
	    <li><a href="javascript:void(0)">合同管理</a></li>
    </ul>
    </div>
    
    <div class="formbody">
    
    	<div class="formtitle"><span>贷款信息详情</span></div>
    	<div class="toolsli">
   			<input type="hidden"  id="myId"  value="${param.id}"/>
   			<input type="hidden"  id="contractId"  value="${param.contractId}"/>
		  	<form id="_loan_detail" name="_loan_detail">
		  		<ul class="forminfo">
				    	<li>
				    		<table class="newtablelist" id="">
						        <tbody>
							        <tr>
								        <td class="newtd">贷款申请号</td>
								        <td colspan="5"><span name="loanCode"></span>&nbsp;</td>
								    </tr>
								    <tr>
								        <td class="newtd">贷款人</td>
								        <td><span name="loanBorrower"></span>&nbsp;</td>
								        <td class="newtd">身份证号</td>
								        <td><span name="clientCardId"></span>&nbsp;</td>
								        <td class="newtd">申请日期</td>
								        <td><span name="loanApplyDate@[yyyy-MM-dd]"></span>&nbsp;</td>
							        </tr>
							        <tr>
								        <td class="newtd">来源渠道</td>
								        <td><span name="loanSource@Loan_Source_Code"></span>&nbsp;</td>
								        <td class="newtd">贷款类型</td>
								        <td><span name="loanType@Loan_Type_Code"></span>&nbsp;</td>
								        <td class="newtd">贷款产品</td>
								        <td><span name="loanProduct@Loan_Product_Code"></span>&nbsp;</td>
							        </tr>
							        <tr>
								        <td class="newtd">业务性质</td>
								        <td><span name="loanNatureBusiness@Loan_Nature_Business_Code"></span>&nbsp;</td>
								        <td class="newtd">客户性质</td>
								        <td><span name="loanNatureClilent@Loan_Nature_Clilent_Code"></span>&nbsp;</td>
								        <td class="newtd">资金性质</td>
								        <td><span name="loanNatureFund@Loan_Nature_Fund_Code"></span>&nbsp;</td>
							        </tr>
							        <tr>
								        <td class="newtd">贷款用途</td>
								        <td><span name="loanPurpose@Loan_Purpose_Code"></span>&nbsp;</td>
								        <td class="newtd">申请额度（元）</td>
								        <td><span name="loanLimitApply"></span>&nbsp;</td>
								        <td class="newtd">贷款期限（月）</td>
								        <td><span name="loanDeadlineApply" id="loanDeadlineApply"></span>&nbsp;</td>
							        </tr>
							        <tr>
								        <td class="newtd">月利率（%）</td>
								        <td><span name="loanRateInterest"></span>&nbsp;</td>
								        <td class="newtd">管理费率（%）</td>
								        <td><span name="loanRateManage"></span>&nbsp;</td>
								        <td class="newtd">手续费率（%）</td>
								        <td><span name="loanRateHandling"></span>&nbsp;</td>
							        </tr>
							        <tr>
								        <td class="newtd">还款方式</td>
								        <td><span name="loanRepayType@Loan_Repay_Type_Code"></span>&nbsp;</td>
								        <td class="newtd">终审额度（元）</td>
								        <td><span name="finalLimit"></span>&nbsp;</td>
								        <td class="newtd">终审期限（月）</td>
								        <td><span name="finalDeadline" id="finalDeadline"></span>&nbsp;</td>
							        </tr>
							        <tr>
								        <td class="newtd">终审月利率（%）</td>
								        <td><span name="finalRate"></span>&nbsp;</td>
								        <td class="newtd">终审管理费率（%）</td>
								        <td><span name="finalRateManage"></span>&nbsp;</td>
								        <td class="newtd">终审手续费率（%）</td>
								        <td><span name="finalRateHandling"></span>&nbsp;</td>
							        </tr>
							        <tr>
								        
								        <td class="newtd">贷款对象</td>
								        <td><span name="loanObject@Loan_Object_Code"></span>&nbsp;</td>
								        <td class="newtd">项目来源人</td>
								        <td colspan="3"><span name="loanSourceName"></span>&nbsp;</td>
							        </tr>
				    			</tbody>
				    		</table>
				    	</li>
				    </ul>
			</form> 
	    </div>
		
	    <div class="formtitle"><span>放款信息</span></div>
    	<div class="toolsli">
			<form id="_pay_detail" name="_pay_detail" enctype="multipart/form-data" method="post">
				<input type="hidden" name="id" id="payId"  value=""/>
    			<ul class="forminfo">
   					<li>
   						<kl class="kl_three">
							<label>批核放款金额<b>*</b></label>
							<input name="payMoney" type="text" disabled="disabled"  class="newinput120 easyui-validatebox"/>（元）  
						</kl>
						<kl class="kl_second">
							<label>实际付款金额<b>*</b></label>
							<input name="payMoneyReal" type="text" disabled="disabled"  class="newinput120 easyui-validatebox"/>（元）  
						</kl>
   					</li>
   					<li>
   						<kl class="kl_three">
				    	 	<label>手续费<b></b></label>  
					    	<input name="payHf" type="text" disabled="disabled" class="newinput120  easyui-validatebox" value="" data-options="validType:['number_interval[0,99999999]']" />（元）
						</kl>
						<kl class="kl_second">
				    	 	<label>调查费<b></b></label>  
					    	<input name="payIf" type="text" disabled="disabled" class="newinput120  easyui-validatebox" value="" data-options="validType:['number_interval[0,99999999]']" />（元）
						</kl>	
					</li>
					<li>
   						<kl class="kl_three">
				    	 	<label>管理费<b></b></label>  
					    	<input name="payMf" type="text" disabled="disabled" class="newinput120  easyui-validatebox" value="" data-options="validType:['number_interval[0,99999999]']" />（元）
						</kl>
						<kl class="kl_second">
				    	 	<label>预收首期利息<b></b></label>  
					    	<input name="payAdvInterest" disabled="disabled" type="text" class="newinput120  easyui-validatebox" value="" data-options="validType:['number_interval[0,99999999]']" />（元）
						</kl>	
					</li>
					<li>
   						<kl class="kl_three">
							<label>放款日期<b>*</b></label>
							<input name="payDate"  id="payDate" type="text" class="newinput190 easyui-validatebox Wdate"  readonly="readonly"  data-options="required:true" onClick="WdatePicker({onpicking:function(dp){
								$('#interestStartTime').val(dp.cal.getNewDateStr());
								$.ajax({
									url:'sys/Other/getDate',
									data:{'payDate':dp.cal.getNewDateStr(),'deadlineTotal':$('#finalDeadline').text()},
									type:'post',
									dataType:'json',
									async:false,
									success:function(result){
										if(typeof(result)=='undefined'){
											alert('计算结算时间异常!');
											return false;
										}
										if(result.state !=200){
											alert(result.message);
											return false;
										}
										var dateInfo = result.data;
										$('#interestEndTime').val(dateInfo.interestEndTime);
										$('#payClearingDay').val(dateInfo.payClearingDay);
									},
									complete:function(){
									}
								});
							}})" />  
						</kl>
						<kl class="kl_second">
				    	 	<label>起息日期<b>*</b></label>  
					    	<input name="interestStartTime" id="interestStartTime" type="text" class="newinput190 easyui-validatebox"  readonly="readonly"  data-options="required:true" 
					    	 />  
						</kl>	
					</li>
					<li>
   						<kl class="kl_three">
							<label>结息日期<b>*</b></label>
							<input name="interestEndTime"  id="interestEndTime" type="text" class="newinput190 easyui-validatebox"  readonly="readonly"  data-options="required:true" 
							 />  
						</kl>
						<kl class="kl_second">
				    	 	<label>结算日<b>*</b></label>  
					    	<input name="payClearingDay" id="payClearingDay" type="text" class="newinput190  easyui-validatebox" value=""  readonly="readonly" data-options="required:true,validType:['number_interval[0,99999999]']" />
						</kl>	
					</li>
   					<li>
						<label>备注<b></b></label>  
						<textarea name="payRemark" cols="" rows="" class="textinput easyui-validatebox" data-options="validType:['unnormal','length[1,600]']"></textarea>							
   					</li>
   					<li><label>&nbsp;</label><input name="" type="submit"  class="scbtn" value="保存"/></li>
  	 			</ul>
   			</form>
	    </div>
	    <div class="formtitle"><span>合同信息</span></div>
    	<div class="toolsli">
			<form id="_contract_detail" name="_contract_detail" enctype="multipart/form-data" method="post">
				<input type="hidden" name="id" id="contractId"  value=""/>
    			<ul class="forminfo">
   					<li>
   						<kl class="kl_three">
							<label>合同编号<b>*</b></label>
							<input name="contractCode" type="text" disabled="disabled"  class="newinput190 easyui-validatebox"/>  
						</kl>
   						<kl class="kl_second">
							<label>合同日期<b>*</b></label>
							<input name="contractDate" type="text" class="newinput190 easyui-validatebox Wdate"  data-options="required:true"onClick="WdatePicker()" />  
						</kl>
   					</li>
   					<li>
   						<kl class="kl_three">
							<label>合同期限<b>*</b></label>  
							<input name="contractDeadline" type="text" class="newinput120 easyui-validatebox" value="" data-options="required:true,validType:['number_interval[1,12]']"/>（月）
						</kl>
					</li>
					<li>
						<kl class="kl_first">
					     	<label>地址<b>*</b></label>
					    	<input name="contractAddress" type="text" class="newinput420 easyui-validatebox" data-options="required:true,validType:['unnormal','length[1,50]']"/>  
					   	</kl>
   					</li>
   					<li>
						<label>合同备注<b></b></label>  
						<textarea name="contractRemark" cols="" rows="" class="textinput easyui-validatebox" data-options="validType:['unnormal','length[1,600]']"></textarea>							
   					</li>
   					<li><label>&nbsp;</label><input name="" type="submit"  class="scbtn" value="保存"/></li>
  	 			</ul>
   			</form>
	    </div>
	    <div class="formtitle"><span>新增/编辑客户银行账户</span></div>
    	<div class="toolsli">
    		<form id="bankForm" name="bankForm" enctype="multipart/form-data" method="post">
				<input type="hidden" name="id" id="bankId"  value=""/>
				<input type="hidden" name="clientId" value="${param.clientId}"/>
  	 			<ul class="forminfo">
					<li>
						<kl class="kl_three">
							<label>账户名<b>*</b></label>
					    	<input name="bankAccount" type="text" class="newinput190 easyui-validatebox" data-options="required:true"  data-options="validType:['length[1,50]']"/>  
						</kl>
						<kl class="kl_second">
					    	<label>银行卡类型<b>*</b></label>
					    	<!-- Client_Bank_Type_Code -->
					    	<select id="bankType" name="bankType" data-options="required:true">
				    			<option value="">请选择</option>
				    		</select>
					    </kl>
					</li>
					<li>
						<kl class="kl_three">
							<label>银行名称<b>*</b></label>
							<!-- Client_Bank_Name_Code -->
							<select id="bankName" name="bankName" data-options="required:true">
				    			<option value="">请选择</option>
				    		</select> 
						</kl>
						<kl class="kl_second">
					    	<label>银行所属支行<b></b></label>
					    	<input name=bankBranch type="text" class="newinput190 easyui-validatebox" data-options="validType:['length[1,50]']"/>
					    </kl>
					</li>
					<li>
					    <kl class="kl_three">
							<label>银行帐号<b>*</b></label>
					    	<input name=bankNumber type="text" class="newinput190 easyui-validatebox" data-options="required:true" data-options="validType:['length[1,50]']"/>    
						</kl>
						<kl class="kl_second">
					    	<label>是否为主帐号<b></b></label>
					    	<!-- Client_Bank_Main_Status_Code -->
					    	<select id="bankMainStatus" name="bankMainStatus" data-options="required:true">
				    			<option value="">请选择</option>
				    		</select> 
					    </kl>
					</li>
			    	<li><label>&nbsp;</label><input type="submit" class="scbtn" value="保存"/>&nbsp;&nbsp;&nbsp;&nbsp;<input onclick="cleanForm();" type="button" class="scbtn" value="重置"/></li>
			    </ul>
   			</form>
	    </div>
		<div class="formtitle"><span>客户银行账户信息</span></div>
    	<div class="toolsli">
    		<table cellpadding="0" cellspacing="0" border="0" class="tablelist" id="bankTable" width="100%;"></table>
	    </div>
	    
	    <div>
	    	<ul class="forminfo">
		    	<li><label>&nbsp;</label><input onclick="submitOrder();" type="button" class="scbtn" value="提交"/>&nbsp;&nbsp;&nbsp;&nbsp;<input name="return_button" type="button" class="scbtn" onclick="history.go(-1);" value="返回"/></li>
	    	</ul>
	    </div>
 
    </div>
</body>
</html>
